/*
	This file is part of Vajolet.

    Vajolet is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Vajolet is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Vajolet.  If not, see <http://www.gnu.org/licenses/>
*/

#ifndef _DATA
#define _DATA


extern int BOARDINDEX[8][8];
extern bitMap BITSET[64];
extern int MS1BTABLE[256];

extern const int FILES[64];
extern const int RANKS[64];
extern const int RANKSHIFT[64];

extern bitMap RANKMASK[64];
extern bitMap FILEMASK[64];
extern bitMap KINGRAYS[64];
extern bitMap DIAGA1H8MASK[64];
extern bitMap DIAGA8H1MASK[64];
extern bitMap ISOLATED_PAWN[64];
extern bitMap PASSED_PAWN[2][64];
extern bitMap SQUARES_IN_FRONT_OF[2][64];
extern bitMap KINGSHIELD[2][64];
extern bitMap PAWNKINGSHIELD[2][2][64];

extern int squareDistance[64][64];

extern const int A8; extern const int B8; extern const int C8; extern const int D8;
extern const int E8; extern const int F8; extern const int G8; extern const int H8;
extern const int A7; extern const int B7; extern const int C7; extern const int D7;
extern const int E7; extern const int F7; extern const int G7; extern const int H7;
extern const int A6; extern const int B6; extern const int C6; extern const int D6;
extern const int E6; extern const int F6; extern const int G6; extern const int H6;
extern const int A5; extern const int B5; extern const int C5; extern const int D5;
extern const int E5; extern const int F5; extern const int G5; extern const int H5;
extern const int A4; extern const int B4; extern const int C4; extern const int D4;
extern const int E4; extern const int F4; extern const int G4; extern const int H4;
extern const int A3; extern const int B3; extern const int C3; extern const int D3;
extern const int E3; extern const int F3; extern const int G3; extern const int H3;
extern const int A2; extern const int B2; extern const int C2; extern const int D2;
extern const int E2; extern const int F2; extern const int G2; extern const int H2;
extern const int A1; extern const int B1; extern const int C1; extern const int D1;
extern const int E1; extern const int F1; extern const int G1; extern const int H1;

extern int whiteIndex[64];
extern int blackIndex[64];
extern bitMap KNIGHT_ATTACKS[64];
extern bitMap WHITE_PAWN_ATTACKS[64];
extern bitMap WHITE_PAWN_MOVES[64];
extern bitMap WHITE_PAWN_DOUBLE_MOVES[64];
extern bitMap BLACK_PAWN_ATTACKS[64];
extern bitMap BLACK_PAWN_MOVES[64];
extern bitMap BLACK_PAWN_DOUBLE_MOVES[64];
extern const int SQUARE_COLOR[64];
extern bitMap SQUARE_COLOR_BITMAP[2];

extern bitMap KING_ATTACKS[64];
extern bitMap RANK_ATTACKS[64][64];      // 32KB
extern bitMap FILE_ATTACKS[64][64];      // 32KB
extern bitMap DIAGA8H1_ATTACKS[64][64];  // 32KB
extern bitMap DIAGA1H8_ATTACKS[64][64];  // 32KB

extern bitMap MG_RANKMASK[64];
extern bitMap MG_FILEMASK[64];
extern bitMap MG_FILEMAGIC[64];
extern bitMap MG_DIAGA8H1MASK[64];
extern bitMap MG_DIAGA8H1MAGIC[64];
extern bitMap MG_DIAGA1H8MASK[64];
extern bitMap MG_DIAGA1H8MAGIC[64];


extern bitMap MASKBD[2];
extern bitMap MASKCE[2];
extern bitMap MASKFG[2];
extern bitMap MASKEG[2];

extern bitMap SQUARES_BETWEEN[64][64];
extern bitMap* SQUARES_BETWEEN_DIRECTION[64][64];

void dataInit(void);

#endif
